<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>删除排序数组中的重复项</title>
	</head>
	<body>
		<script>
			var arr=[9,3,9,4,2,1,2,4,2,3,2,3,19,5];
			function show(array){
				var aa = array.sort(function(a,b){
					return a-b;
				})
				console.log(aa);
				for(var i=0;i<aa.length-1;i++){
					for(var j=i+1;j<aa.length;j++){
						if(aa[i]==aa[j]){
							aa.splice(j,1);
							j--;
//							console.log('aa',aa);
							
						}
						
					}
					
				}
			return aa;
			}
			console.log('111',show(arr));
		</script>
	</body>
</html>
